package com.lantosec.hmrp.modules.system.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.lantosec.hmrp.modules.system.entity.SysWorkday;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 系统工作日管理 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-03-24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SysWorkday对象", description="系统工作日管理")
public class SysWorkdayVO extends BaseVO<SysWorkday> {
    private static final long serialVersionUID = 1L;


    public SysWorkdayVO(SysWorkday entity){
        this.workdayDate = entity.getWorkdayDate();
        this.workdayYaer = entity.getWorkdayYaer();
        this.workdayMonth = entity.getWorkdayMonth();
        this.workdayDay = entity.getWorkdayDay();
        this.workdayWeek = entity.getWorkdayWeek();
        this.workdayType = entity.getWorkdayType();
        this.flag = entity.getFlag();
    }

    @Override
    public SysWorkday convertToEntity(){
        return new SysWorkday(this);
    }


    @ApiModelProperty(value = "日期(yyyy-MM-dd)")
    private String workdayDate;

    @ApiModelProperty(value = "年")
    private String workdayYaer;

    @ApiModelProperty(value = "月")
    private String workdayMonth;

    @ApiModelProperty(value = "日")
    private String workdayDay;

    @ApiModelProperty(value = "周")
    private Integer workdayWeek;

    @ApiModelProperty(value = "工作日类型(0工作日1正常休息2国定节假日)")
    private Integer workdayType;

    @ApiModelProperty(value = "标识")
    @TableField(exist = false)
    private Integer flag;


}
